//
//  CropIntroLeftTableviewCell.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/12/6.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "CropIntroLeftTableviewCell.h"
#define defaultColor rgba(253, 212, 49, 1)
#define rgba(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]

@interface CropIntroLeftTableviewCell ()

@property (nonatomic, strong) UIView *yellowView;

@end

@implementation CropIntroLeftTableviewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.name = [[UILabel alloc] initWithFrame:CGRectMake(0, 7, 80, 30)];
        self.name.numberOfLines = 0;
        self.name.textAlignment = NSTextAlignmentCenter;
        self.name.font = [UIFont systemFontOfSize:14];
        self.name.textColor = COLOR_DIV;
        self.name.highlightedTextColor = COLOR_GREEN;
        [self.contentView addSubview:self.name];
        
        self.yellowView = [[UIView alloc] initWithFrame:CGRectMake(0, 7, 5, 30)];
        self.yellowView.backgroundColor = COLOR_GREEN;
        [self.contentView addSubview:self.yellowView];
        
    }
    return self;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
    
    self.contentView.backgroundColor = selected ? [UIColor whiteColor] : [UIColor colorWithWhite:0 alpha:0.1];
    self.highlighted = selected;
    self.name.highlighted = selected;
    self.yellowView.hidden = !selected;
}




@end
